#!/usr/bin/ruby

require 'test/unit'
require 'lib/trafmonitor'

include LibTrafmonitor

config = Config.new( '/root/.trafmonitorrc' )
$LOG   = Logger.new( config.logfile )

class TestStats < Test::Unit::TestCase
    def test_Stats_initialization
        stats = Stats.new
        assert_instance_of( Stats, stats, 'Object "stats" is not an instance of Stats' )
    end

    def test_Stats_reset
        stats  = Stats.new
        retval = stats.reset

        assert( retval, 'Stats#reset returns false' )
    end

    def test_Stats_time_running
        stats  = Stats.new
        assert_kind_of( Numeric, stats.time_running, 'Stats#time_running doesn\'t return Numeric' )
    end
end
